﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KerriganDataContract.Authentification;

namespace KerriganDataContract
{
    public class Identify
    {

        public static void CheckUser()
        {

            using (ServiceProxy Srv = new ServiceProxy())
            {
                string requestCookie = Request.Cookies["AXPXAUTHFWC"].Value;
                FormsAuthenticationTicket authentification = FormsAuthentication.Decrypt(requestCookie);
                string user = authentification.UserData;
                string[] idUser = user.Split(',');

                //DirectionEmployeeDC emp = new DirectionEmployeeDC();
                //emp.Person = new PersonDC();
                //emp.Person.IdPerson = int.Parse(idUser[2]);
                //BlogDC bo = new BlogDC();
                //bo.BlogCategory = new BlogCategoryDC();
                //bo.BlogCategory.IdBlogCategory = int.Parse(DropDownListCategory.SelectedValue);
                //bo.Person = new PersonDC();
                //bo.Person.IdPerson = int.Parse(idUser[2]);
                //bo.Title = txtTitle.Text;
                //bo.ContentTopic = TxtBoxContent.InnerText;
                //bo.PostedBy = emp;
                //Srv.Service.AddArticle(bo);

            }


        }

    }
}
